#pragma once

#include <netinet/in.h>

class InetAddress
{
private:
    sockaddr_in m_addr;

public:
    InetAddress();
    InetAddress(sockaddr_in addr);
    InetAddress(const char *ip, uint16_t port);
    ~InetAddress();

    const char *ip() const;
    uint16_t port() const;
    const sockaddr *addr() const;
    void set_addr(const sockaddr_in &clientaddr);
};